1. Field of the Invention
The present invention relates to an imaging device and an automatic focus adjustment method, and in detailed relates to an imaging device and automatic focus adjustment method capable of accurate focus detection even for a subject such as a point light source when taking photographs at night.
2. Description of the Related Art
As a method for automatic focus detection for a photographing lens provided in an imaging device, a contrast AF method has conventionally been used. This contrast AF method is a method that calculates a contrast value for a subject image formed by the photographing lens, and controls position of the photographing lens so that this contrast value becomes a peak value.
The conventional contrast AF operation will be described using FIG. 6A and FIG. 6B. FIG. 6A shows variation in an AF evaluation value L1 and an AE evaluation value L2 with respect to lens position of the photographing lens. Here, the AF evaluation value L1 is an integrated value of contrast values, and the AE evaluation value is a value relating to subject brightness. If the photographing lens is moved between infinity and the close-up end, the AF evaluation value will become maximum at a focus position P1, as shown in FIG. 6A. With focus control using contrast AF therefore, the photographing lens is controlled so that the AF evaluation value becomes the peak value. Ordinarily, the AE evaluation value relating to subject brightness does not vary significantly, even if there is variation in the lens position of the photographing lens,
In the flowchart shown in FIG. 6B, control using contrast AF first performs direction determination (S101). Here, a contrast value is obtained based on image data from an image sensor, and then a contrast value is obtained again with the photographing lens having been moved a specified amount in a predetermined direction, the size of these two contrast values is compared, and the direction in which the contrast value becomes larger is determined to be the movement direction of the photographing lens (refer to movement (1) in FIG. 6A).
Once directional determination has been carried out, peak value detection for the contrast value is carried out (S103). Here, contrast values are compared each time the photographing lens is moved, and it is determined whether a contrast value peak is passed through. Specifically, when a current contrast value has become smaller than the previous contrast value, a peak of the contrast value has been passed through, and so a peak position at this time is detected using an interpolation technique or the like (refer to movement (2) in FIG. 6A).
If a peak position is detected, the lens is moved to this detected peak position (S105). Here, the photographing lens is returned to the peak position that was calculated using an interpolation technique or the like in step S103. As a result, it is possible to bring the photographing lens to a focus position (refer to movement (3) in FIG. 6A).
In this manner, it is possible to drive the photographing lens to a focus point using contrast AF. However, if focus detection is carried out using this conventional contrast AF, there is a possibility of focusing on a false focus point in a case where the subject is a point light source. False focus for the case of a point light source will be described using FIG. 7A to FIG. 7D.
In the case of forming an image of a point light source subject using a photographing lens, at a focus position P1, as shown in FIG. 7B, the point light source is at its smallest, and the AF evaluation value L1 is also at a minimum at this time. If the photographing lens is driven from the focus position P1, the image formed by the photographing lens gradually becomes blurred and larger, and the AF evaluation value L1 also becomes larger. At a maximum position P2, the image becomes as shown in FIG. 7C, and the AF evaluation value is at a maximum value. If the lens is moved further from this maximum position P2, then the image formed by the photographing lens is blurred more and more on the slope part of the AF evaluation value L1 curve (in the vicinity of position P3), and the AF evaluation value becomes a small value.
In the case of this type of point light source, there is a possibility of the maximum position P2 where there is a peak of the AF evaluation value being determined as the focus position of the photographing lens. Therefore, in order to solve this disadvantage, the following solutions have been proposed in Japanese patent laid-open No. 2005-345877 (laid-open Dec. 15, 2005).
(1) Depending on subject brightness (=Bv) at the time of AF, a focus position is selected from either a minimum position of AE evaluation value or maximum position of AF evaluation value.
(2) Distance between the minimum position of AE evaluation value and the maximum position of AF evaluation value is calculated, and either the maximum or minimum is selected as the focus position depending on this distance.
With the above described solution (1), for a point light source, since the AE evaluation value becomes a minimum value at focus position P1, whether or not it is a night scene etc. in which point light sources appear is determined using subject brightness (=Bv), and in the case where subject brightness is low the minimum position of the AE evaluation value is made the focus point. Also, with the above described solution (2), in the case of a point light source the distance between the focus position P1 and the maximum position P2 is within a specified distance range, and depending on the distance either a minimum or maximum is made the focus position.